<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="__PUBLIC__/echarts/echarts.min.js"></script>
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__PUBLIC__/font-awesome/css/font-awesome.min.css" media="all">
    <link rel="stylesheet" href="__CSS__/admin.css"  media="all">
    <script src="{$Think.config.httpFlag}{$Think.config.google_map_url}" async="async"></script>
    <script src="/googlemap/googleMarkerPoint.js?version=0.10"></script>
</head>
<style>
    .poinumbtn{
        font-size: 12px;
        margin-left: 5px;
    }
    .seemap:hover{
        color: #666;
    }
    .layui-upload-img{
        width: 200px;
        margin-right: 10px;
        margin-bottom: 10px;
    }
    .sale_price,.cost_price{
        width:82%;
        float:left;
    }
    .currency{
        width:8%;
        margin-top:10px;
        margin-right:5px;
        font-size:12px;
        font-weight:bold;
        float:left;
    }
</style>
<body>
<div class="layui-fluid main">

    <div style="display: inline-block;width: 35%;">
        <fieldset class="layui-elem-field site-demo-button" style="margin-top:20px;border:0">
            <h2><strong>{if !empty($name)}{$name}{/if}</strong>
                {volist name='classify_list' id='class_value'}
                <a href="{:url('admin/poi/poisee',['id'=>$id,'typeid'=>$class_value['classify_id']])}" class="poinumbtn">
                    {$class_value['classify_name']}（<span style="color: #f90">{$class_value['total_num']}</span>）
                </a>
                {/volist}
            </h2>
        </fieldset>
        <fieldset class="layui-elem-field site-demo-button" style="margin-top: 30px;border:0;">
            <form class="layui-form serch" action="/admin/poi/poisee/id/{$id}.shtml" method="post">
                <div class="layui-form-item" style="float: left;">
                    <div class="layui-input-inline">
                        <input type="text" name="name" lay-verify="title" value="{if isset($wherelist['name'])}{$wherelist['name']}{/if}" autocomplete="off" placeholder="请输入poi名称" class="layui-input layui-btn-sm">
                    </div>
                    <button class="layui-btn layui-btn-danger layui-btn-sm" lay-submit="" lay-filter="serch">搜索</button>
                    <a href="{if $usemap=='amap'}{:url('admin/poi/addnewpoibyamap',['groupid'=>$id])}{else}{:url('admin/poi/addpoi',['groupid'=>$id])}{/if}" class="layui-btn layui-btn-sm a_menu">
                        新增POI
                    </a>

                    <a href="{:url('admin/poi/citypoi')}" class="layui-btn layui-btn-sm">
                        返回列表
                    </a>
                </div>
            </form>
        </fieldset>
        <div style="overflow-y:scroll;height: 600px">
            <table class="layui-table"   lay-even="" lay-skin="line">
                <colgroup>
                    <col width="100">
                    <col width="300">
                    <col width="300">
                    <col width="300">
                    <col width="200">
                </colgroup>
                <thead>
                <tr >
                    <th>ID</th>
                    <th>POI名称</th>
                    <th>类型</th>
                    <th>更新时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>

                {volist name="poi" id="vo"}
                <tr  class="seemap" codeid="{$vo.id}">
                    <td>{$vo.id}</td>
                    <td><strong>{$vo.name}</strong><br/>{$vo.eng_name}</td>
                    <td>{$vo.type}</td>
                    <td>{$vo.update_time}</td>
                    <td class="operation-menu">
                        <a href="{if $usemap=='amap'}{:url('admin/poi/addnewpoibyamap',['id'=>$vo.id])}{else}{:url('admin/poi/addpoi',['id'=>$vo.id])}{/if}" class="layui-btn layui-btn-xs a_menu" style="margin-left: 0;font-size:12px;">修改</a>
                        <a href="{:url('admin/poi/addticket',['id'=>$vo.id])}" class="layui-btn layui-btn-normal layui-btn-xs a_menu" style="margin-top:5px;margin-left: 0;font-size:12px;">门票</a>
                        <a href="{:url('admin/poi/changeCity',['id'=>$vo.id])}" class="layui-btn layui-btn-warm layui-btn-xs a_menu_city" style="margin-top:5px;margin-left: 0;font-size:12px;">迁移</a>
                        <a class="layui-btn layui-btn-xs layui-btn-danger delete" data-id="{$vo.id}" style="margin-top:5px;margin-left: 0;font-size:12px;">删除</a>
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
        </div>
    </div>

    <div class="right75" id="cityMap" style="height:600px;overflow:auto;width: 60%;margin: 10px 0">
        <div style="margin: 10px  0">
            <blockquote class="layui-elem-quote">绿色区域为方圆50公里</blockquote>
            <div id="city_map" style="height: 750px;width: 100%"></div>
        </div>
    </div>
    <div class="right75" id="poiInfo" style="height:750px;overflow:auto;width: 60%;margin: 10px 0;display: none;">
        <div style="margin: 10px  0">
            <div style="margin: 10px 0"><h2 id="poiname">{if $poiname}{$poiname}{/if}</h2><span class="color666" id="poieng_name">{if $poieng_name}{$poieng_name}{/if}</span></div>
            <div id="introduce" style="color: #9c9c9c">
                {if $introduce}{$introduce}{/if}
            </div>

            <div id="mobile">
                {if $mobile}<hr><strong>联系方式：</strong><span  class="colorf90">{$mobile}</span>{/if}
            </div>

            <div id="shop">
                {if $shop}<hr><strong>门店：</strong><span  class="colorf90">{$shop}</span>{/if}
            </div>

            <div id="cooking">
                {if $cooking}<hr><strong>菜系：</strong><span  class="colorf90">{$cooking}</span>{/if}
            </div>

            <div id="grade">
                {if $grade}<hr><strong>星级：</strong>
                <span class="colorf90"  >{$grade}</span>{/if}
            </div>


            <div id="ticket">
                {if $ticket}
                <hr><strong>门票信息：</strong>
                <div class="colorf90" style="white-space: pre-wrap;">{$ticket}</div>
                {/if}
            </div>

            <div id="ticketCost">
                {if $ticketCost}<hr><strong>门票成本：</strong>
                <span  style="color: #9c9c9c">{$ticketCost}</span>{/if}
            </div>

            <div id="ticketPrice">
                {if !empty($ticketPriceData)}
                <table class="layui-table" lay-even="" lay-skin="row" lay-size="sm">
                    <colgroup>
                        <col width="50%">
                        <col width="10%">
                        <col width="20%">
                        <col width="20%">
                    </colgroup>
                    <thead>
                    <tr>
                        <th>门票名称</th>
                        <th>数量</th>
                        <th>建议销售价（{$currencyName}）</th>
                        <th>采购成本价（{$currencyName}）</th>
                    </tr>
                    </thead>
                    <tbody id="ticket_body">
                    {if !empty($ticketPriceData)}
                    {volist name="$ticketPriceData" id="vo"}
                    <tr>
                        <td><input value="{$vo.name}" autocomplete="off" placeholder="请输入门票名称" class="layui-input tic-input color-input" type="text" readonly></td>
                        <td><input value="x 1" autocomplete="off" class="layui-input tic-input color-input" type="text" readonly></td>
                        <td>
                            <div class="currency">{$currency}</div>
                            <input value="{$vo.sale_price}" autocomplete="off" class="layui-input tic-input color-input sale_price" placeholder="销售价" type="text" readonly>
                        </td>
                        <td>
                            <div class="currency">{$currency}</div>
                            <input disabled value="{$vo.cost_price}" autocomplete="off" class="layui-input tic-input color-input cost_price" placeholder="采购价" type="text">
                        </td>
                    </tr>
                    {/volist}
                    {/if}
                    </tbody>
                </table>
                {/if}
            </div>

            <div id="ticketLastAdmin">
                {if $ticketLastAdmin}<hr><strong>门票修改人/修改时间：</strong>
                <span  style="color: #9c9c9c">{$ticketLastAdmin}/{$ticketLastUpdtime}</span>{/if}
            </div>

            <div id="open_time">
                {if $open_time} <hr><strong>开放时间：</strong>
                <span  style="color: #9c9c9c">{$open_time}</span>{/if}
            </div>

            <div id="use_time">
                {if $use_time} <hr><strong>用时参考：</strong>
                <span  style="color: #9c9c9c">{$use_time}</span>{/if}
            </div>

            <div id="source">
                {if $source}<hr><strong>来源：</strong>
                <span  style="color: #9c9c9c">{$source}</span>{/if}
            </div>


            <div id="description">
                {if $description}<hr><strong>特别说明：</strong>
                <span  style="color: #9c9c9c">{$description}</span>{/if}
            </div>

            <div id="remark">
                {if $remark}<hr><strong>备注：</strong>
                <span  style="color: #9c9c9c">{$remark}</span>{/if}
            </div>

            <!--酒店参数-->
            <div id="breakfast_fee">
                {if $breakfast_fee}<hr><strong>早餐：</strong>
                <span  style="color: #9c9c9c">{$breakfast_fee}</span>{/if}
            </div>
            <div id="charging_fee">
                {if $charging_fee}<hr><strong>加人费：</strong>
                <span  style="color: #9c9c9c">{$charging_fee}</span>{/if}
            </div>
            <div id="service_fee">
                {if $service_fee}<hr><strong>服务费：</strong>
                <span  style="color: #9c9c9c">{$service_fee}</span>{/if}
            </div>
            <div id="checkin_time">
                {if $checkin_time}<hr><strong>入住时间：</strong>
                <span  style="color: #9c9c9c">{$checkin_time}</span>{/if}
            </div>
            <div id="price_json">
                {if !empty($price_json)}
                <hr><strong>价格详情：</strong>
                <table class="layui-table" lay-even="" style="width:70%;">
                    <colgroup>
                        <col width="50">
                        <col width="30">
                    </colgroup>
                    <thead>
                    <tr>
                        <th colspan="2" style="text-align: center"><h3>含税价</h3></th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="price_json" id="vo"}
                    <tr>
                        <td>{$vo.day}</td>
                        <td>C$ {$vo.price}</td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
                {/if}
            </div>

            <hr>
            <div style="margin: 10px  0" id="thumb">
                {volist name="$thumb" id="vo"}
                {if !empty($vo)}
                <span class="uploadimgbox"><img class="layui-upload-img" src="{$vo}"></span>
                {/if}
                {/volist}
            </div>

            {if !empty($poi)}
            <div>
                <input type="hidden" id="poiImage" value="{notempty name='$poi'}{$poi[0]['id']}{/notempty}">
                <a href="" class="layui-btn layui-btn-sm a_btn">
                    打开图片库
                </a>
            </div>
            {/if}

            <div id="address">
                {if $address} <hr><strong>位置：</strong>
                <span  style="color: #9c9c9c">{$address}</span>{/if}
            </div>
        </div>

        {if $latlng[0]!=='' && $latlng[1]!==''}
        <div id="poi_map" style="height: 500px;width: 100%"></div>
        {/if}

        <hr>
        <div id="nearspots">
            {if $nearspots}<hr><strong style="display: inline-block;margin-bottom: 10px">附近景点：</strong>
            <div style="color: #9c9c9c">
                {volist name="nearspots" id="vo"}
                <span style="display: inline-block;width: 100%;" class="seemap" codeid="{$vo[2]}">{$vo[0]}({$vo[1]}km)</span>
                <hr class="layui-bg-gray">
                {/volist}
            </div>{/if}
        </div>
    </div>
</div>
<script src="__PUBLIC__/layui/layui.js"></script>
<script src="__PUBLIC__/jquery/jquery.min.js"></script>
<script type="text/javascript">
    layui.use('layer', function(){
        var layer = layui.layer;
        $('.a_menu').click(function(){
            var url = $(this).attr('href');
            var a = 0;
            $.ajax({
                url:url
                ,async:false
                ,success:function(res){
                    if(res.code == 0) {
                        layer.msg(res.msg);
                        a = 1;
                    }
                }
            });
            if(a === 0) {
                layer.open({
                    type:2,
                    content:url,
                    area: ['65%', '85%'],
                    end:function(){
                        location.reload();
                    }
                });
            }
            return false;
        });

        $('.a_menu_city').click(function(){
            var url = $(this).attr('href');
            layer.open({
                type:2,
                content:url,
                area: ['500px', '500px'],
                end:function(){
//                    location.reload();
                }
            });
            return false;
        });

        $('.a_btn').click(function(){
            var id = $("#poiImage").attr('value');
            var url="/admin/poi/poiImage/id/"+id+".shtml";
            var a = 0;
            $.ajax({
                url:url
                ,async:false
                ,success:function(res){
                    if(res.code == 0) {
                        layer.msg(res.msg);
                        a = 1;
                    }
                }
            });
            if(a === 0) {
                layer.open({
                    type:2,
                    content:url,
                    area: ['70%', '90%'],
                    end:function(){
                        location.reload();
                    }
                });
            }
            return false;
        })

    });

    $('.delete').click(function(){
        var id = $(this).attr('data-id');
        layer.confirm('确定要删除?', function(index) {
            $.ajax({
                url:"{:url('admin/poi/delpoi')}",
                type:"post",
                data:{id:id},
                success:function(res) {
                    layer.msg(res.msg);
                    if(res.code == 1) {
                        setTimeout(function(){
                            location.href = res.url;
                        },1500)
                    }
                }
            })
        })
    });

    $("body").on("click",".seemap",function () {
        var id = $(this).attr('codeid');
        $.ajax({
            url:"{:url('admin/poi/seepoimap')}",
            data:{id:id},
            success:function(res) {
                if(res.code == 1) {
                    //隐藏城市地图 显示poi信息
                    $("#cityMap").hide();
                    $("#poiInfo").show();
                    var data=res.data;
                    $("#poiImage").attr("value",data[0].id);
                    $("#poiname").html(data[0].name);
                    $("#poieng_name").html(data[0].eng_name);
                    $("#introduce").html(data[0].introduce);

                    if(data[0].description!==null && data[0].description!=""){
                        $("#description").html('<hr><strong>特别说明：</strong>' +
                            '<span style="color: #9c9c9c">'+data[0].description+'</span>');
                    }else{
                        $("#description").html("");
                    }

                    if(data[0].mobile!==null && data[0].mobile!=""){
                        $("#mobile").html('<hr><strong>联系方式：</strong>' +
                            '                <span class="colorf90"  >'+data[0].mobile+'</span>');
                    }else{
                        $("#mobile").html("");
                    }

                    if(data[0].cooking!=""&&data[0].cooking!=null){
                        $("#cooking").html('<hr><strong>菜系：</strong>' +
                            '                <span class="colorf90"  >'+data[0].cooking+'</span>');
                    }else{
                        $("#cooking").html("");
                    }

                    if(data[0].shop!=""&&data[0].shop!=null){
                        $("#shop").html('<hr><strong>门店：</strong>' +
                            '                <span class="colorf90"  >'+data[0].shop+'</span>');
                    }else{
                        $("#shop").html("");
                    }

                    if(data[0].ticket!=""&&data[0].ticket!=null){
                        $("#ticket").html('<hr><strong>门票信息：</strong>' +
                            '                <div class="colorf90" style="white-space: pre-wrap;" >'+data[0].ticket+'</div>');
                    }else{
                        $("#ticket").html("");
                    }

                    if(data[0].ticket_cost!=""&&data[0].ticket_cost!=null){
                        $("#ticketCost").html('<hr><strong>门票成本：</strong>' +
                            '<span style="color: #9c9c9c"  >'+data[0].ticket_cost+'</span>');
                    }else{
                        $("#ticketCost").html("");
                    }

                    if(data[0].ticketPriceData.length>0 && data[0].ticketPriceData!=null){
                        var ticketPriceData = data[0].ticketPriceData;
                        var currency = data[0].currency;
                        var ticketPrice_html = '<table class="layui-table" lay-even="" lay-skin="row" lay-size="sm">' +
                            '<colgroup>' +
                            '<col width="50%">' +
                            '<col width="10%">' +
                            '<col width="20%">' +
                            '<col width="20%">' +
                            '</colgroup>' +
                            '<thead>' +
                            '<tr>' +
                            '<th>门票名称</th>' +
                            '<th>数量</th>' +
                            '<th>建议销售价（{$currencyName}）</th>' +
                            '<th>采购成本价（{$currencyName}）</th>' +
                            '</tr>' +
                            '</thead>' +
                            '<tbody id="ticket_body">';

                        for(var i=0;i<ticketPriceData.length;i++){
                            ticketPrice_html += '<tr class="ticket_tr">' +
                                '<td><input autocomplete="off" value="'+ticketPriceData[i]['name']+'" class="layui-input tic-input ticket_name" type="text" readonly></td>' +
                                '<td><input value="x 1" autocomplete="off" class="layui-input tic-input" type="text" readonly></td>' +
                                '<td>' +
                                '<div class="currency">'+currency+'</div>' +
                                '<input value="'+ticketPriceData[i]['sale_price']+'" autocomplete="off" class="layui-input tic-input sale_price" placeholder="销售价" type="text" readonly>' +
                                '</td>' +
                                '<td>' +
                                '<div class="currency">'+currency+'</div>' +
                                '<input value="'+ticketPriceData[i]['cost_price']+'" autocomplete="off" class="layui-input tic-input cost_price" placeholder="采购价" type="text" readonly>' +
                                '</td>' +
                                '</tr>';
                        }

                        ticketPrice_html += '</tbody></table>';
                        $("#ticketPrice").html(ticketPrice_html);
                    }else{
                        $("#ticketPrice").html("");
                    }

                    if(data[0].ticket_last_admin!=""&&data[0].ticket_last_admin!=null){
                        $("#ticketLastAdmin").html('<hr><strong>门票修改人/修改时间：</strong>' +
                            '<span style="color: #9c9c9c"  >'+data[0].ticket_last_admin+'/'+data[0].ticket_last_updtime+'</span>');
                    }else{
                        $("#ticketLastAdmin").html("");
                    }

                    if(data[0].open_time!==null && data[0].open_time!=""){
                        $("#open_time").html('<hr><strong>开放时间：</strong>' +
                            '<span style="color: #9c9c9c"  >'+data[0].open_time+'</span>');
                    }else{
                        $("#open_time").html("");
                    }


                    if(data[0].use_time!==null && data[0].use_time!=""){
                        $("#use_time").html('<hr><strong>用时参考：</strong>' +
                            '<span style="color: #9c9c9c"  >'+data[0].use_time+'</span>');
                    }else{
                        $("#use_time").html("");
                    }

                    if(data[0].source!==null && data[0].source!=""){
                        $("#source").html('<hr><strong>来源：</strong>' +
                            '<span  style="color: #9c9c9c">'+data[0].source+'</span>');
                    }else{
                        $("#source").html("");
                    }

                    if(data[0].grade!==null && data[0].grade>0){
                        var star = '';
                        for(var i=0;i<data[0].grade;i++){
                            star+="★";
                        }
                        $("#grade").html('<hr><strong>星级：</strong>\n' +
                            '<span style="color: #9c9c9c" >'+star+'</span>');
                    }else{
                        $("#grade").html("");
                    }


                    //酒店参数
                    if(data[0].remark!==null && data[0].remark!==""){
                        $("#remark").html('<hr><strong>备注：</strong>' +
                            '<span  style="color: #9c9c9c">'+data[0].remark+'</span>');
                    }else{
                        $("#remark").html("");
                    }
                    if(data[0].breakfast_fee!==null && data[0].breakfast_fee!==""){
                        $("#breakfast_fee").html('<hr><strong>早餐：</strong>' +
                            '<span  style="color: #9c9c9c">'+data[0].breakfast_fee+'</span>');
                    }else{
                        $("#breakfast_fee").html("");
                    }
                    if(data[0].charging_fee!==null && data[0].charging_fee!==""){
                        $("#charging_fee").html('<hr><strong>加人费：</strong>' +
                            '<span style="color: #9c9c9c">'+data[0].charging_fee+'</span>');
                    }else{
                        $("#charging_fee").html("");
                    }
                    if(data[0].service_fee!==null && data[0].service_fee!==""){
                        $("#service_fee").html('<hr><strong>服务费：</strong>' +
                            '<span style="color: #9c9c9c">'+data[0].service_fee+'</span>');
                    }else{
                        $("#service_fee").html("");
                    }
                    if(data[0].checkin_time!==null && data[0].checkin_time!==""){
                        $("#checkin_time").html('<hr><strong>入住时间：</strong>' +
                            '<span  style="color: #9c9c9c">'+data[0].checkin_time+'</span>');
                    }else{
                        $("#checkin_time").html("");
                    }
                    if(data[0].price_json!==null && data[0].price_json!==''){
                        var price_html = '<hr><strong>价格详情：</strong><table class="layui-table" lay-even="" style="width:70%;"><colgroup><col width="50"><col width="30"></colgroup><thead><tr><th colspan="2" style="text-align: center"><h3>含税价</h3></th></tr></thead><tbody>';
                        for (var j=0;j<data[0].price_json.length;j++) {
                            var price_value = data[0].price_json[j].price;
                            if(price_value!==null && price_value!=='' && price_value!=='现询'){
                                price_value = "C$ "+price_value;
                            }
                            price_html+='<tr><td>'+data[0].price_json[j].day+'</td><td>'+price_value+'</td></tr>';
                        }
                        price_html += '</tbody></table>';
                        $("#price_json").html(price_html);
                    }else{
                        $("#price_json").html("");
                    }

                    if(data[0].address!==null && data[0].address!=""){
                        $("#address").html('<hr><strong>位置：</strong>' +
                            '<span style="color: #9c9c9c" >'+data[0].address+'</span>');
                    }else{
                        $("#address").html("");
                    }


                    var nearspotsbox="";
                    for(var i=0 ;i<data[0].nearspots.length;i++){
                        nearspotsbox+=' <span  style="display: inline-block;width: 100%;" class="seemap" codeid="'+data[0].nearspots[i][2]+'">'+data[0].nearspots[i][0]+'('+data[0].nearspots[i][1]+'km)</span>' +
                            '<hr class="layui-bg-gray">';
                    }

                    if(nearspotsbox!=""){
                        $("#nearspots").html('<hr><strong style="display: inline-block;margin-bottom: 10px">附近景点：</strong><div style="color: #9c9c9c">' + nearspotsbox+'</div></span>');
                    }else{
                        $("#nearspots").html("");
                    }

                    var thumbbox="";
                    var thumbs=data[0].thumb.split(",");
                    for (var i=0;i<thumbs.length;i++){
                        if(thumbs[i]){
                            thumbbox+='<span class="uploadimgbox"><img class="layui-upload-img" src="'+thumbs[i]+'"></span>'
                        }
                    }
                    $("#thumb").html(thumbbox);
                    if(loadmap && data[0].lat!='' && data[0].lng!=''){
                    initialize(data[0].lat,data[0].lng);
                    }else{
                        $('#poi_map').hide();//隐藏地图
                    }
                }else{
                    layer.msg(res.msg);
                }
            }
        })
    })

    //渲染城市景点地图
    var poilist = {$city_poi_list};
    var cityinfo = {$city_info};
    if(cityinfo!==null){
        map_name = "city_map";
        var selfPoi = {};
        selfPoi.lat = parseFloat(cityinfo.lat);
        selfPoi.lng = parseFloat(cityinfo.lng);
        initMapPoint(map_name,selfPoi,poilist,selfPoi,'',false,false);
        $("#"+map_name).css('height','500px');
    }
</script>

<script type="text/javascript">
    //地图功能
    var geocoder;
    var map2;
    var loadmap = true;
    try{
        var marker=new google.maps.Marker();
    }catch(e){
        loadmap = false;
        {notempty name="$city"}layer.msg('地图加载失败');{/notempty}
    }
    var checkMap = function(loadmap){
        if(!loadmap){return false;}
    }
    function initialize(lat,lng) {
        geocoder = new google.maps.Geocoder();
        var myOptions = {
            zoom : 10,//缩放比例
            center:new google.maps.LatLng(lat,lng),
            mapTypeId : google.maps.MapTypeId.ROADMAP
        };
        map2 = new google.maps.Map(document.getElementById("poi_map"),
            myOptions);
        marker.setMap(null);
        marker = new google.maps.Marker({
            map : map2,
            position :new google.maps.LatLng(lat,lng),
            //坐标动画效果
            animation : google.maps.Animation.DROP
        });
        marker.setMap(map2);
    }
    //判断经纬度是否正确
    {if !empty($latlng[0]) && !empty($latlng[1])}
    //判断地图是否正常加载
    if(loadmap){
        initialize({$latlng[0]},{$latlng[1]});
    }else{
        $('#poi_map').hide();//隐藏地图
    }
    {/if}

</script>
</body>
</html>
